<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Doxygen: apps/point_cloud_editor/include/pcl/apps/point_cloud_editor/commandQueue.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Doxygen
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('command_queue_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="headertitle">
<div class="title">commandQueue.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="command_queue_8h.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160; </div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160; </div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="preprocessor">#ifndef COMMAND_QUEUE_H_</span></div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="preprocessor">#define COMMAND_QUEUE_H_</span></div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160; </div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="preprocessor">#include &lt;deque&gt;</span></div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="local_types_8h.html">pcl/apps/point_cloud_editor/localTypes.h</a>&gt;</span></div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160; </div>
<div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="class_command_queue.html">   53</a></span>&#160;<span class="keyword">class </span><a class="code" href="class_command_queue.html">CommandQueue</a></div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;{</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;  <span class="keyword">public</span>:</div>
<div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="class_command_queue.html#a80d86eb1a3b1dd57ea84bde88fd295ee">   59</a></span>&#160;    <a class="code" href="class_command_queue.html#a80d86eb1a3b1dd57ea84bde88fd295ee">CommandQueue</a> ();</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160; </div>
<div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="class_command_queue.html#ae02deec8bd98cd435972d7e26de9135b">   65</a></span>&#160;    <a class="code" href="class_command_queue.html#ae02deec8bd98cd435972d7e26de9135b">CommandQueue</a> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> max_size);</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160; </div>
<div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="class_command_queue.html#a4575d426ec483ab4778da0650c0556bb">   68</a></span>&#160;    <a class="code" href="class_command_queue.html#a4575d426ec483ab4778da0650c0556bb">~CommandQueue</a> ()</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    {</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    }</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160; </div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;    <span class="keywordtype">void</span></div>
<div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="class_command_queue.html#a5428e7b41da441f80ed9ec8656aebde4">   77</a></span>&#160;    <a class="code" href="class_command_queue.html#a5428e7b41da441f80ed9ec8656aebde4">execute</a> (<a class="code" href="local_types_8h.html#a7e9464d95cb6863e6a188a54282b3a98">CommandPtr</a>);</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160; </div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;    <span class="keywordtype">void</span></div>
<div class="line"><a name="l00082"></a><span class="lineno"><a class="line" href="class_command_queue.html#a7d27b61af07a5e036b0f555196e8a29d">   82</a></span>&#160;    <a class="code" href="class_command_queue.html#a7d27b61af07a5e036b0f555196e8a29d">undo</a> ();</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160; </div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span></div>
<div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="class_command_queue.html#a56e82b9ca9b8a703fecb3c6be0f87696">   92</a></span>&#160;    <a class="code" href="class_command_queue.html#a56e82b9ca9b8a703fecb3c6be0f87696">setMaxSize</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> size);</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160; </div>
<div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="class_command_queue.html#af134156818c2a8283e4d53cd28df0820">   95</a></span>&#160;    <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_command_queue.html#af134156818c2a8283e4d53cd28df0820">DEFAULT_MAX_SIZE_</a> = 200;</div>
<div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    </div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;  <span class="keyword">private</span>:</div>
<div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="class_command_queue.html#ac829d35ed9d50374f86118c33579cc01">   99</a></span>&#160;    <a class="code" href="class_command_queue.html#ac829d35ed9d50374f86118c33579cc01">CommandQueue</a>(<span class="keyword">const</span> <a class="code" href="class_command_queue.html">CommandQueue</a>&amp;)</div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    {</div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;      assert(<span class="keyword">false</span>);</div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;    }</div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;    </div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    <a class="code" href="class_command_queue.html">CommandQueue</a>&amp; </div>
<div class="line"><a name="l00106"></a><span class="lineno"><a class="line" href="class_command_queue.html#aacf2b38a40b8c9c98350a9fc8585d023">  106</a></span>&#160;    <a class="code" href="class_command_queue.html#aacf2b38a40b8c9c98350a9fc8585d023">operator= </a>(<span class="keyword">const</span> <a class="code" href="class_command_queue.html">CommandQueue</a>&amp;)</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    {</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;      assert(<span class="keyword">false</span>); <span class="keywordflow">return</span> (*<span class="keyword">this</span>);</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;    }</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160; </div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;    <span class="keywordtype">void</span></div>
<div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="class_command_queue.html#a04b512001c88c45ad5822653a56a2fd5">  114</a></span>&#160;    <a class="code" href="class_command_queue.html#a04b512001c88c45ad5822653a56a2fd5">enforceDequeLimit</a> ();</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160; </div>
<div class="line"><a name="l00117"></a><span class="lineno"><a class="line" href="class_command_queue.html#a8c19c769b294cb230595191365a8eb34">  117</a></span>&#160;    std::deque&lt;CommandPtr&gt; <a class="code" href="class_command_queue.html#a8c19c769b294cb230595191365a8eb34">command_deque_</a>;</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160; </div>
<div class="line"><a name="l00120"></a><span class="lineno"><a class="line" href="class_command_queue.html#a2c4af33c8d8c7d0dc375234f37b6baa9">  120</a></span>&#160;    <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_command_queue.html#a2c4af33c8d8c7d0dc375234f37b6baa9">depth_limit_</a>;</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;};</div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;<span class="preprocessor">#endif </span><span class="comment">// COMMAND_QUEUE_H_</span></div>
<div class="ttc" id="aclass_command_queue_html"><div class="ttname"><a href="class_command_queue.html">CommandQueue</a></div><div class="ttdoc">A structure for managing commands</div><div class="ttdef"><b>Definition:</b> commandQueue.h:54</div></div>
<div class="ttc" id="aclass_command_queue_html_a04b512001c88c45ad5822653a56a2fd5"><div class="ttname"><a href="class_command_queue.html#a04b512001c88c45ad5822653a56a2fd5">CommandQueue::enforceDequeLimit</a></div><div class="ttdeci">void enforceDequeLimit()</div><div class="ttdoc">Enforces the depth limit of the command queue. If the depth is larger than the depth limit,...</div></div>
<div class="ttc" id="aclass_command_queue_html_a2c4af33c8d8c7d0dc375234f37b6baa9"><div class="ttname"><a href="class_command_queue.html#a2c4af33c8d8c7d0dc375234f37b6baa9">CommandQueue::depth_limit_</a></div><div class="ttdeci">unsigned int depth_limit_</div><div class="ttdoc">The depth limit of the command queue.</div><div class="ttdef"><b>Definition:</b> commandQueue.h:120</div></div>
<div class="ttc" id="aclass_command_queue_html_a4575d426ec483ab4778da0650c0556bb"><div class="ttname"><a href="class_command_queue.html#a4575d426ec483ab4778da0650c0556bb">CommandQueue::~CommandQueue</a></div><div class="ttdeci">~CommandQueue()</div><div class="ttdoc">Destructor</div><div class="ttdef"><b>Definition:</b> commandQueue.h:68</div></div>
<div class="ttc" id="aclass_command_queue_html_a5428e7b41da441f80ed9ec8656aebde4"><div class="ttname"><a href="class_command_queue.html#a5428e7b41da441f80ed9ec8656aebde4">CommandQueue::execute</a></div><div class="ttdeci">void execute(CommandPtr)</div><div class="ttdoc">Executes a command. If the command has an undo function, then adds the command to the queue.</div></div>
<div class="ttc" id="aclass_command_queue_html_a56e82b9ca9b8a703fecb3c6be0f87696"><div class="ttname"><a href="class_command_queue.html#a56e82b9ca9b8a703fecb3c6be0f87696">CommandQueue::setMaxSize</a></div><div class="ttdeci">unsigned int setMaxSize(unsigned int size)</div></div>
<div class="ttc" id="aclass_command_queue_html_a7d27b61af07a5e036b0f555196e8a29d"><div class="ttname"><a href="class_command_queue.html#a7d27b61af07a5e036b0f555196e8a29d">CommandQueue::undo</a></div><div class="ttdeci">void undo()</div><div class="ttdoc">Undoes the last command by poping the tail of the queue, invoke the undo function of the command.</div></div>
<div class="ttc" id="aclass_command_queue_html_a80d86eb1a3b1dd57ea84bde88fd295ee"><div class="ttname"><a href="class_command_queue.html#a80d86eb1a3b1dd57ea84bde88fd295ee">CommandQueue::CommandQueue</a></div><div class="ttdeci">CommandQueue()</div><div class="ttdoc">Defaut Constructor</div></div>
<div class="ttc" id="aclass_command_queue_html_a8c19c769b294cb230595191365a8eb34"><div class="ttname"><a href="class_command_queue.html#a8c19c769b294cb230595191365a8eb34">CommandQueue::command_deque_</a></div><div class="ttdeci">std::deque&lt; CommandPtr &gt; command_deque_</div><div class="ttdoc">The internal representation of this object.</div><div class="ttdef"><b>Definition:</b> commandQueue.h:117</div></div>
<div class="ttc" id="aclass_command_queue_html_aacf2b38a40b8c9c98350a9fc8585d023"><div class="ttname"><a href="class_command_queue.html#aacf2b38a40b8c9c98350a9fc8585d023">CommandQueue::operator=</a></div><div class="ttdeci">CommandQueue &amp; operator=(const CommandQueue &amp;)</div><div class="ttdoc">Equal operator - object is non-copyable</div><div class="ttdef"><b>Definition:</b> commandQueue.h:106</div></div>
<div class="ttc" id="aclass_command_queue_html_ac829d35ed9d50374f86118c33579cc01"><div class="ttname"><a href="class_command_queue.html#ac829d35ed9d50374f86118c33579cc01">CommandQueue::CommandQueue</a></div><div class="ttdeci">CommandQueue(const CommandQueue &amp;)</div><div class="ttdoc">Copy constructor - object is non-copyable</div><div class="ttdef"><b>Definition:</b> commandQueue.h:99</div></div>
<div class="ttc" id="aclass_command_queue_html_ae02deec8bd98cd435972d7e26de9135b"><div class="ttname"><a href="class_command_queue.html#ae02deec8bd98cd435972d7e26de9135b">CommandQueue::CommandQueue</a></div><div class="ttdeci">CommandQueue(unsigned int max_size)</div><div class="ttdoc">Constructor</div></div>
<div class="ttc" id="aclass_command_queue_html_af134156818c2a8283e4d53cd28df0820"><div class="ttname"><a href="class_command_queue.html#af134156818c2a8283e4d53cd28df0820">CommandQueue::DEFAULT_MAX_SIZE_</a></div><div class="ttdeci">static const unsigned int DEFAULT_MAX_SIZE_</div><div class="ttdoc">The default maximal size of the depth limit</div><div class="ttdef"><b>Definition:</b> commandQueue.h:95</div></div>
<div class="ttc" id="alocal_types_8h_html"><div class="ttname"><a href="local_types_8h.html">localTypes.h</a></div></div>
<div class="ttc" id="alocal_types_8h_html_a7e9464d95cb6863e6a188a54282b3a98"><div class="ttname"><a href="local_types_8h.html#a7e9464d95cb6863e6a188a54282b3a98">CommandPtr</a></div><div class="ttdeci">boost::shared_ptr&lt; Command &gt; CommandPtr</div><div class="ttdoc">The type for boost shared pointer pointing to a command object</div><div class="ttdef"><b>Definition:</b> localTypes.h:93</div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_9654b8d08f4bba4e84b362c5fd320bee.html">apps</a></li><li class="navelem"><a class="el" href="dir_b812044310263d1df0acdcc34fa78063.html">point_cloud_editor</a></li><li class="navelem"><a class="el" href="dir_e7676f72fdf944a58a9890202aea4fdd.html">include</a></li><li class="navelem"><a class="el" href="dir_f36a0c0a6789487b19709622e8aaedff.html">pcl</a></li><li class="navelem"><a class="el" href="dir_dfd6ef21606ddfa5cd0b7ee0903ae9ec.html">apps</a></li><li class="navelem"><a class="el" href="dir_4eea226eade4b66d41c153c54681c108.html">point_cloud_editor</a></li><li class="navelem"><a class="el" href="command_queue_8h.html">commandQueue.h</a></li>
    <li class="footer">制作者 <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
